import request from '@/utils/request'

export function getList() {
  return request({
    url: '/role/getAllRoleTree',
    method: 'get'
  })
}

export function createRole(data) {
  return request({
    url: '/system/role/save',
    method: 'post',
    data
  })
}

export function editRole(data) {
  return request({
    url: '/system/role/update',
    method: 'post',
    data
  })
}

export function getRoleID(id) {
  return request({
    url: '/system/role/getOne/' + id,
    method: 'get'
  })
}

